#include <iostream>
using namespace std;

string compare(string& s){
	int length = 0,maxLength = 0;
	int i = 0;
	int len = s.size();
	string res;
	int fast = 0,slow = 0;
	while(fast <= len){
		if(s[fast] >= '0' && s[fast] <= '9'){
			while(fast <= len){ 
				if(s[fast] >= '0' && s[fast] <= '9'){
					fast++;
				}else{
					if((fast - slow) > res.size()){
						res = s.substr(slow,fast - slow);
					}
					slow = fast;
					break;
				}
			}
		}else{
			fast++;
			slow++;
		}
	}
	return res;
}
int main(){
	string s;
	cin>>s;
	string res = compare(s);
	cout<<res<<endl;
	
	return 0;
}
